import Header from "@/src/components/layouts/header"; import { ApiKeyList } from "@/src/features/public-api/components/ApiKeyList"; import { DeleteProjectButton } from "@/src/features/projects/components/DeleteProjectButton"; import { HostNameProject } from "@/src/features/projects/components/HostNameProject"; import RenameProject from "@/src/features/projects/components/RenameProject"; import { Button } from "@/src/components/ui/button"; import Link from "next/link"; import { LlmApiKeyList } from "@/src/features/public-api/components/LLMApiKeyList"; import { PagedSettingsContainer } from "@/src/components/PagedSettingsContainer"; import { useQueryProject } from "@/src/features/projects/hooks"; import { MembershipInvitesPage } from "@/src/features/rbac/components/MembershipInvitesPage"; import { MembersTable } from "@/src/features/rbac/components/MembersTable"; import { JSONView } from "@/src/components/ui/CodeJsonViewer"; import { PostHogLogo } from "@/src/components/PosthogLogo"; import { Card } from "@/src/components/ui/card"; import { ScoreConfigSettings } from "@/src/features/scores/components/ScoreConfigSettings"; import { TransferProjectButton } from "@/src/features/projects/components/TransferProjectButton"; import { useHasEntitlement } from "@/src/features/entitlements/hooks"; import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess"; import { useRouter } from "next/router"; import { SettingsDangerZone } from "@/src/components/SettingsDangerZone"; import { ActionButton } from "@/src/components/ActionButton"; import { BatchExportsSettingsPage } from "@/src/features/batch-exports/components/BatchExportsSettingsPage"; import { AuditLogsSettingsPage } from "@/src/ee/features/audit-log-viewer/AuditLogsSettingsPage"; import { ModelsSettings } from "@/src/features/models/components/ModelSettings"; import ConfigureRetention from "@/src/features/projects/components/ConfigureRetention"; import ContainerPage from "@/src/components/layouts/container-page"; import ProtectedLabelsSettings from "@/src/features/prompts/components/ProtectedLabelsSettings"; import { Slack } from "lucide-react"; type ProjectSettingsPage = { title: string; slug: string; show?: boolean | (() => boolean); cmdKKeywords?: string[]; } & ({ content: React.ReactNode } | { href: string }); export function useProjectSettingsPages(): ProjectSettingsPage[] { const router = useRouter(); const { project, organization } = useQueryProject(); const showBillingSettings = useHasEntitlement("cloud-billing"); const showRetentionSettings = useHasEntitlement("data-retention"); const showProtectedLabelsSettings = useHasEntitlement( "prompt-protected-labels", ); if (!project || !organization || !router.query.projectId) { return []; } return getProjectSettingsPages({ project, organization, showBillingSettings, showRetentionSettings, showLLMConnectionsSettings: true, showProtectedLabelsSettings, }); } export const getProjectSettingsPages = ({ project, organization, showBillingSettings, showRetentionSettings, showLLMConnectionsSettings, showProtectedLabelsSettings, }: { project: { id: string; name: string; metadata: Record }; organization: { id: string; name: string; metadata: Record }; showBillingSettings: boolean; showRetentionSettings: boolean; showLLMConnectionsSettings: boolean; showProtectedLabelsSettings: boolean; }): ProjectSettingsPage[] => [ { title: "General", slug: "index", cmdKKeywords: ["name", "id", "delete", "transfer", "ownership"], content: (
{showRetentionSettings && }
, }, { title: "Delete this project", description: "Once you delete a project, there is no going back. Please be certain.", button: , }, ]} />
), }, { title: "API Keys", slug: "api-keys", cmdKKeywords: ["auth", "public key", "secret key"], content: (
), }, { title: "LLM Connections", slug: "llm-connections", cmdKKeywords: [ "llm", "provider", "openai", "anthropic", "azure", "playground", "evaluation", "endpoint", "api", ], content: (
), show: showLLMConnectionsSettings, }, { title: "Models", slug: "models", cmdKKeywords: ["cost", "token"], content: , }, { title: "Protected Prompt Labels", slug: "protected-prompt-labels", cmdKKeywords: ["prompt", "label", "protect", "lock"], content: , show: showProtectedLabelsSettings, }, { title: "Scores / Evaluation", slug: "scores", cmdKKeywords: ["config"], content: , }, { title: "Members", slug: "members", cmdKKeywords: ["invite", "user"], content: (
), }, { title: "Integrations", slug: "integrations", cmdKKeywords: ["posthog"], content: , }, { title: "Exports", slug: "exports", cmdKKeywords: ["csv", "download", "json", "batch"], content: , }, { title: "Audit Logs", slug: "audit-logs", cmdKKeywords: ["trail"], content: , }, { title: "Billing", slug: "billing", href: `/organization/${organization.id}/settings/billing`, show: showBillingSettings, }, { title: "Organization Settings", slug: "organization", href: `/organization/${organization.id}/settings`, }, ]; export default function SettingsPage() { const { project, organization } = useQueryProject(); const router = useRouter(); const pages = useProjectSettingsPages(); if (!project || !organization) return null; return ( ); } const Integrations = (props: { projectId: string }) => { const hasAccess = useHasProjectAccess({ projectId: props.projectId, scope: "integrations:CRUD", }); const allowBlobStorageIntegration = useHasEntitlement( "scheduled-blob-exports", ); return (
{/* eslint-disable-next-line @next/next/no-img-element */}

We have teamed up with PostHog (OSS product analytics) to make Langfuse Events/Metrics available in your Posthog Dashboards.

Configure
Blob Storage

Configure scheduled exports of your trace data to S3 compatible storages or Azure Blob Storage. Set up a scheduled export to your own storage for data analysis or backup purposes.

Configure
Slack

Connect a Slack workspace and create channel automations to receive Langfuse alerts natively in Slack.

Configure
); };